package com.hbl.xyl;

import java.lang.reflect.Field;
import java.lang.reflect.Method;

public class AppRef {
    public static void main(String[] args)throws Exception{
        Class<?>H=Class.forName("com.hbl.xyl.people");
        Object o=H.newInstance();
        Field name= H.getDeclaredField("name");
        name.setAccessible(true);
        name.set(o,"hhh");
        Method getName=H.getMethod("getName");
        Object result=getName.invoke(o);
        System.out.println(result);


    }
}
